<?php
 /**
 * @author qianfunian

 * @package Example-application
 */

require('./configs/config.php');
// INCLUDE JCART BEFORE SESSION START
require 'jcart/jcart.php';
// START SESSION
session_start();

include 'header.php';

$goods = $db->get_all("select * from `s_goods`");
$smarty->assign('goods',$goods);
// INITIALIZE JCART AFTER SESSION START
$cart =& $_SESSION['jcart']; if(!is_object($cart)) $cart = new jcart();

$smarty->assign('jcart',$cart->display_cart($jcart));

$smarty->display('index.tpl');
?>
